package fr.alma.trajectory.commons;

import java.util.List;

public abstract class ASpaceObject implements SpaceObject {
	
	public static final Double TRIANGLE = 10.;
	public static final Double SQUARE = 10.;
	public static final Double RECTANGLE = 10.;
	public static final Double LOSANGE = 10.;
	
	/**
	 * Au moins 3 points dans l'espace representant les sommets de l'objet
	 */
	protected SpacePoint p1;
	protected SpacePoint p2;
	protected SpacePoint p3;

	public ASpaceObject(SpacePoint p1, SpacePoint p2, SpacePoint p3){
		this.p1 = p1;
		this.p2 = p2;
		this.p3 = p3;
	}
	
	public SpacePoint getPoint1(){
		return p1;
	}
	
	public SpacePoint getPoint2(){
		return p2;
	}

	public SpacePoint getPoint3(){
		return p3;
	}
	
	public SpacePoint getReference(){
		return getPoint1();
	}

	@Override
	public boolean isTriangle(){
		return false;
	}
	
	@Override
	public boolean isRectangle(){
		return false;
	}
	
	@Override
	public boolean isDisc(){
		return false;
	}
	
	@Override
	public boolean isLosange(){
		return false;
	}
	
	@Override
	public boolean isSquare(){
		return false;
	}
	
	@Override
	public abstract List<SpacePoint> getSpacePoints();

	@Override
	public String toString(){
		return p1+";"+p2+";"+p3;
	}

}
